package com.fenqile.pop;

/**
 * 接口返回错误
 * 
 * @author Coby [cobylin@live.com] 2017
 */
public class FenQiLeApiException extends RuntimeException {
	private static final long serialVersionUID = 4201082960941725026L;
	
	private final int code;
	
	public FenQiLeApiException(int code, String msg, String sub_msg) {
		super(String.format("[%d] %s: %s", code, msg, sub_msg));
		this.code = code;
	}
	
	/**
	 * 获取接口错误代码
	 * @return 接口错误代码
	 */
	public int getCode() {
		return code;
	}
	
}
